import { createRouter, createWebHistory } from 'vue-router'
import Login from '@/views/Login/index.vue'
import Layout from '@/views/Layout/index.vue'
import Home from '@/views/Home/index.vue'
import DashBoard from '@/views/DashBoard/index.vue'
import BasicForm from '@/views/Form/views/BasicForm/index.vue'
import StepForm from '@/views/Form/views/StepForm/index.vue'
import SuperForm from '@/views/Form/views/SuperForm/index.vue'
import BasicDetail from '@/views/Detail/views/BasicDetail/index.vue'
import SuperDetail from '@/views/Detail/views/SuperDetail/index.vue'
import Echarts from '@/views/Manage/views/Echarts/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      component: Login
    },
    {
      path: '/',
      redirect: '/home',
      component: Layout,
      children: [
        {
          path: 'home',
          component: Home
        },
        {
          path: 'dashboard',
          component: DashBoard
        },
        {
          path: 'form/basicform',
          component: BasicForm
        },
        {
          path: 'form/stepform',
          component: StepForm
        },
        {
          path: 'form/superform',
          component: SuperForm
        },
        {
          path: 'detail/basicdetail',
          component: BasicDetail
        },
        {
          path: 'detail/superdetail',
          component: SuperDetail
        },
        {
          path: 'manage/echarts',
          component: Echarts
        }
      ]
    }
  ]
})

export default router
